package com.bw.lib_core.mvp.view;

import android.os.Bundle;
import android.os.PersistableBundle;

import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity;

import com.bw.lib_core.mvp.presenter.IPresenter;

public abstract class BaseActivity< P extends IPresenter> extends AppCompatActivity implements IView,IActivity{
    protected P pPresenter;

    @Override
    protected void onCreate( Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(bandlayout());
        initView();
        initData();
    }

    @Override
    public void showToast(String msg) {

    }

    @Override
    protected void onDestroy() {
        super.onDestroy();
        if (pPresenter!=null){
            pPresenter.destory();
            pPresenter=null;
        }
    }
}
